package book;

public class Book {
    private String name;
    private String author;
    private int price;
    private boolean islend;
    private String type;
    public String getName() {
        return name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }


    public boolean isIslend() {
        return islend;
    }

    public void setIslend(boolean islend) {
        this.islend = islend;
    }

    public void setName(String name) {
        this.name = name;
    }
//构造方法
public Book(String name, String author, int price, String type) {
    this.name = name;
    this.author = author;
    this.price = price;
    this.type = type;

}

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                (islend==true?"已借出":"未借出")+
                '}';
    }
}
